const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const studentsSchema = new Schema({
    name: {
        type: String,
        unique: false,
        required: true, 
        default: 'abc'
    },
    age: Number,
    sex: String,
    stu_id: {
        type: String,
        unique: true, 
        required: true, 
    },
    createDate: {
        type: Date,
        default: Date.now()
    },
    info: Schema.Types.Mixed 
})
module.exports = mongoose.model('students', studentsSchema);